package com.cskaoyan.controller;

import com.cskaoyan.bean.BaseRespVo;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.*;

/**
 * 请求方法限定
 */
@Controller
@ResponseBody
public class RequestMethodLimitController {

    //@RequestMapping(value = "method/get", method = RequestMethod.GET)
    @GetMapping("method/get")
    public BaseRespVo methodget() {
        return BaseRespVo.ok("get");
    }
    //@RequestMapping(value = "method/post",method = RequestMethod.POST)
    @PostMapping("method/post")
    public BaseRespVo methodpost() {
        return BaseRespVo.ok("post");
    }
    //或
    @RequestMapping(value = "method/double",method = {RequestMethod.GET,RequestMethod.POST})
    public BaseRespVo methoddouble() {
        return BaseRespVo.ok("double");
    }
}
